/*
 * @Date: 2022-04-01 14:49:00
 * @LastEditors: LiuPeng
 * @LastEditTime: 2022-04-01 15:07:51
 * @FilePath: \pay\src\components\Info\AgencyCardList\AddCardDealerInfo.jsx
 * @Description: 添加卡商
 * 
 */
import React from 'react'
import {
  Form, Input, Radio,
  Row, Col, Button
} from 'antd'


import './../../HOC/HocButton/index.css'



//检测用户名是否可用 按钮点击事件
const detectAvailability = () => {
  console.log(123);
}

export default function AddCardDealerInfo() {

  /* 验证规则  Form.Item*/
  const rules = [{ required: true, message: '必填项不能为空！' }]

  return (
    <div style={{ 'padding': '10px 5px' }}>
      {/* 修改 */}
      <Form
        name="repeatPasswordForm"
        labelCol={{ span: 8 }}
        wrapperCol={{ span: 16 }}
        autoComplete="off"
      >
        <Row gutter={24}>
          {/* 用户名 */}
          <Col span={12}>
            <Form.Item
              label="用户名"
              name="userName"
              rules={rules}
            >
              <Input placeholder='请输入用户名' />
            </Form.Item>
          </Col>

          {/* 检测用户名是否可用 按钮 */}
          <Col span={12}>
            <Button
              type='primary'
              className='green'
              onClick={detectAvailability}
            >
              检测是否可用
            </Button>
          </Col>

          {/* 商户名称 */}
          <Col span={12}>
            <Form.Item
              label="商户名称"
              name="merchantName"
              rules={rules}
            >
              <Input placeholder='请输入商户名称' />
            </Form.Item>
          </Col>

          {/* 登陆密码* */}
          <Col span={12}>
            <Form.Item
              label="登陆密码"
              name="password"
              rules={rules}
            >
              <Input placeholder='请输入登陆密码' />
            </Form.Item>
          </Col>

          {/* 重复登陆密码* */}
          <Col span={12}>
            <Form.Item
              label="重复登陆密码"
              name="repeatPpassword"
              rules={rules}
            >
              <Input placeholder='请输入重复登陆密码' />
            </Form.Item>
          </Col>

          {/* IP白名单 */}
          <Col span={12}>
            <Form.Item
              label="IP白名单"
              name="IPWhitelist"
            >
              <Input placeholder='请输入IP白名单' />
            </Form.Item>
          </Col>

          {/* 最小金额 */}
          <Col span={12}>
            <Form.Item
              label="最小金额"
              name="minimumAmount"
              initialValue={0}
            >
              <Input />
            </Form.Item>
          </Col>

          {/* 最大金额 */}
          <Col span={12}>
            <Form.Item
              label="最大金额"
              name="maximumAmount"
              initialValue={0}
            >
              <Input />
            </Form.Item>
          </Col>

          {/* 谷歌认证码* */}
          <Col span={12}>
            <Form.Item
              label="谷歌认证码"
              name="GoogleAuthenticationCode"
              rules={rules}
            >
              <Input placeholder='请输入谷歌认证码' />
            </Form.Item>
          </Col>

          {/* 费率(%)* */}
          <Col span={12}>
            <Form.Item
              label="费率(%)"
              name="rate"
              rules={rules}
              initialValue={0}
            >
              <Input />
            </Form.Item>
          </Col>

          {/* 单笔固定金额(元)* */}
          <Col span={12}>
            <Form.Item
              label="单笔固定金额(元)"
              name="singleFixedAmount"
              rules={rules}
              initialValue={0}
            >
              <Input />
            </Form.Item>
          </Col>

          {/* 账号状态 */}
          <Col span={12}>
            <Form.Item
              label="账号状态"
              name="accountStatus"
              initialValue='正常'
            >
              <Radio.Group >
                <Radio value='正常'>正常</Radio>
                <Radio value='冻结'>冻结</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>

          {/* 谷歌验证码状态 */}
          <Col span={12}>
            <Form.Item
              label="谷歌验证码状态"
              name="GoogleVerificationCodeStatus"
              initialValue='关闭'
            >
              <Radio.Group >
                <Radio value='关闭'>关闭</Radio>
                <Radio value='启用'>启用</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>

          {/* 登录白名单状态 */}
          <Col span={12}>
            <Form.Item
              label="登录白名单状态"
              name="loginWhitelistStatus"
              initialValue='关闭'
            >
              <Radio.Group >
                <Radio value='关闭'>关闭</Radio>
                <Radio value='启用'>启用</Radio>
              </Radio.Group>
            </Form.Item>
          </Col>
          {/* 标记颜色 */}
          <Col span={12}>
            <Form.Item
              label="标记颜色"
              name="markerColor"
              rules={rules}
              initialValue='#ffffff'
            >
              <Input
                type='color'
              />
            </Form.Item>
          </Col>


        </Row>
      </Form>

    </div>
  );
}
